﻿using System;
using System.Collections.Generic;
using System.Text;
using Mapper.Enums;
using System.Reflection;
using Mapper.DbProvider;
using Mapper.DataProviders;

namespace Mapper
{
    public class Mapping
    {
        #region static_attributes
        private static List<Map> _mapping ;
        private static String _connectionString;
        private static EDataProvider _EDataProvider;
        private static DataProvider _DataProvider;
        #endregion
        public static void AddMapClass(Type type,Assembly ass) 
        { 
        }
        public static void setConnectionString(String connectionString)
        {
            this._connectionString = connectionString;
        }
        public static void setDataProvider(EDataProvider DataProvider)
        {
            
            if (_connectionString == null || _connectionString == "")
                throw new Exception("The Connection String is invalid, set it correctly!");
            this._EDataProvider = DataProvider;
            switch (_EDataProvider)
            {
                case EDataProvider.SqlServer: this._DataProvider = new SqlServer(_connectionString); break;
                case EDataProvider.OLEDB: this._DataProvider = new OleDb(_connectionString); break;
            }
        }
        
    }
}
